FROM openjdk:8-jre-alpine

RUN echo -e "http://mirrors.aliyun.com/alpine/v3.9/main/" > /etc/apk/repositories

RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shanghai" > /etc/timezone && apk del tzdata

ADD target/service-community.jar /root/app.jar

ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-Dspring.profiles.active=docker","-Duser.timezone=GMT+08","-jar","/root/app.jar"]